import App from './App'
import Vue from 'vue'
import uView from 'uview-ui';
// 引入uView组件
Vue.use(uView);

// // 引入处理时间库
// import moment from "moment";
// Vue.prototype.$moment = moment;

// 获取全局请求路径
import * as api from './api/api.js'
Vue.prototype.$api=api

// 获取全局请求方法
import * as http from './utils/request.js'
const httpTmp = http.default;
Object.keys(httpTmp).forEach(funcName => {
    Vue.prototype[funcName] = httpTmp[funcName].bind(Vue.prototype)
})

// 获取全局公共方法
import * as common from './utils/common.js'
const comTmp = common.default;
Object.keys(comTmp).forEach(funcName => {
    Vue.prototype[funcName] = comTmp[funcName].bind(Vue.prototype)
})

Vue.filter('filterNull', function (value,value2='') {
  if (value==null) return value2
  else return value
})

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()